package net.celisdelafuente.java.Acacia.util;

import net.celisdelafuente.java.Acacia.util.Environment;

import org.eclipse.jetty.server.Server;
import org.eclipse.jetty.webapp.WebAppContext;


public class StartServer {
	
	public static void main(String[] args) throws Exception {
		
		Environment env = new Environment();
		env.configure();
		
		String jetty_home = System.getProperty("jetty.home", "..");
		
		Server server = new Server(env.getTcpport());
		
		WebAppContext webapp = new WebAppContext();
        webapp.setContextPath(env.getAppContextPath());
        webapp.setWar(env.getWarFile());
        server.setHandler(webapp);
	        
		server.start();
		server.join();
	}
	
}
